package com.example.administrator.appjiamzhi;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageButton;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;

/**
 * Created by Administrator on 2017/1/5.
 */
public class genduo extends zhuye {
    private Button fanhui_Button;
    private ImageButton mima_Button1,genxing_Button,guanyu_Button;
    private Switch mSwitch;
    private TextView mViewShow;


    private Switch aSwitch;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.genduo);
        fanhui_Button = (Button) findViewById(R.id.button_fanghui1);
        mima_Button1 = (ImageButton) findViewById(R.id.as);
        genxing_Button = (ImageButton) findViewById(R.id.jiance);
        guanyu_Button = (ImageButton) findViewById(R.id.guanyu);
        aSwitch = (Switch) findViewById(R.id.switch1);
        fanhui_Button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(genduo.this,gerenzhongxin.class);
                startActivity(intent);
            }
        });

        mViewShow = (TextView)findViewById(R.id.tv_show);

        // 设置Switch开关
        mSwitch = (Switch)findViewById(R.id.switch1);
        mSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                            if (isChecked) {
                                // 开启switch，设置提示信息
                                Toast.makeText(genduo.this, "开", Toast.LENGTH_LONG).show();

                            } else {
                                // 关闭swtich，设置提示信息
                                Toast.makeText(genduo.this, "关", Toast.LENGTH_LONG).show();
                            }
                        }
                    });
        mima_Button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(genduo.this,xiugaimima.class);
                startActivity(intent);
            }
        });


                }


            }
